<div class="modal-header">
    <h4 class="modal-title">{{sale_info.sale_name}}</h4>
</div>
<div class="modal-body clearfix">
    <div class="row col-xs-12">
        <div class="col-xs-2 mt10 text-right">
            <p>出游时间</p>
        </div>
        <div class="col-xs-6">
            <!-- <div class="input-group">
                <span class="input-group-addon">身份证号</span>
                <input type="text" class="form-control" ng-model="order_info.cardno" ng-disabled="sale_category == 'F11' || sale_category == 'F15'">
            </div>
            <div class="input-group mt20">
                <span class="input-group-addon">游客姓名</span>
                <input type="text" class="form-control" ng-model="order_info.name" ng-disabled="sale_category == 'F11' || sale_category == 'F15'">
            </div>
            <div class="input-group mt20">
                <span class="input-group-addon">联系电话</span>
                <input type="text" class="form-control" ng-model="order_info.mobile" ng-disabled="sale_category == 'F11' || sale_category == 'F15'">
            </div>
            <div class="input-group num mt20">
                <span class="input-group-addon">购票数量</span>
                <button type="button" class="btn btn-default jian " ng-click="jian()">-</button>
                <input type="text" class="kuang" ng-model="order_info.num">
                <button type="button" class="btn btn-default jia" ng-click="jia()">+</button>
            </div>
            <div class="input-group mt20">
                <span class="input-group-addon">备注信息</span>
                <input type="text" class="form-control" ng-model="order_info.note">
            </div> -->
            <div class="input-group col-xs-6">
                <!-- <span class="input-group-addon">出游时间</span> -->
                <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="order_info.date.value" is-open="order_info.date.opened"
                    readonly close-text="关闭" current-text="今天" clear-text="清除" />
                <span class="input-group-btn" ng-if="sale_info.price_type == '0'">
                    <button type="button" class="btn btn-default" ng-click="open($event, order_info.date)">
                        <i class="glyphicon glyphicon-calendar"></i>
                    </button>
                </span>
                <span class="input-group-btn" ng-if="sale_info.price_type == '1'">
                    <button type="button" class="btn btn-default" ng-click="selectDate()">
                        <i class="glyphicon glyphicon-calendar"></i>
                    </button>
                </span>
            </div>
            <div class="col-sm-12" ng-show="sale_info.tour_date_type == '1'" style="padding-left: 0px;">
                <p class="form-control-static text-danger">
                    出游时间必填，该票种只能在出游日期使用！！！！</p>
            </div>
        </div>
    </div>
    <div class="row col-xs-12 mt20">
        <div class="col-xs-2 mt10 text-right">
            <p>支付方式</p>
        </div>
        <div class="col-xs-10">
            <div class="input-group">
                <div class="radio">
                    <label class="i-checks ml20">
                        <input type="radio" name="-_-" ng-model="order_info.pay_method" value="account">
                        <i></i>平台预存支付
                    </label>
                    <label class="i-checks ml20" ng-if="sale_info.authorized_type == '0'">
                        <input type="radio" name="-_-" ng-model="order_info.pay_method" value="credit">
                        <i></i>供应商预存支付
                    </label>
                </div>
            </div>
        </div>
    </div>
    <div class="col-xs-12 row mt20">
        <div class="col-xs-2 mt10 text-right">
            <p>游客信息</p>
        </div>
        <div class="col-xs-10">
            <div class="panel panel-default">
                <div class="panel-heading">
                    购票人
                    <a class="btn btn-xs btn-success" ng-click="add()">添加</a>
                    <a class="btn btn-xs btn-danger" ng-click="removeAll()">清空</a>
                    <a class="btn btn-success btn-xs pull-right" style="margin-left: 5px;" href="http://oss.juyouhx.com/CDN/model_new.xls">下载模板</a>
                    <!-- <a class="btn btn-success btn-xs pull-right" style="margin-left: 5px;" ng-click="exportToExcel('#Excel_table_2')">下载模板</a> -->
                    <a class="btn btn-success btn-xs pull-right" style="margin-left: 5px;" ng-click="exportToExcel('#Excel_table')">导出人员信息</a>
                    <a class="btn btn-info btn-xs pull-right" ng-click="excel()">导入人员信息</a>
                    <a id="dlink" download="{{ExcelName}}.xls" ng-show="false"></a>
                </div>
                <div class="panel-body" style="padding: 0px;">
                    <table class="table table-bordered" style="margin-bottom: 0px;">
                        <thead>
                            <tr>
                                <th class="text-center" style="width: 80px; padding: 0px; padding-bottom: 7px;">姓名</th>
                                <th class="text-center" style="width: 171px; padding: 0px; padding-bottom: 7px;">身份证</th>
                                <th class="text-center" style="width: 120px;">电话</th>
                                <th class="text-center" style="width: 80px;">数量</th>
                                <th class="text-center" style="width: 100px;">备注</th>
                                <th class="text-center" style="width: 55px; padding: 0px; padding-bottom: 7px;">操作</th>
                                <th class="text-center" style="width: 80px; padding: 0px; padding-bottom: 7px;">校验状态</th>
                                <th class="text-center">结果</th>
                            </tr>
                        </thead>
                        <tbody class="body_data">
                            <tr ng-click="edit($index)" ng-repeat="info in userList" ng-show="userList && userList.length > 0">
                                <td class="text-center">
                                    <input type="text" class="form-control" ng-model="info.name" ng-blur="is_pass(info)" placeholder="姓名">
                                </td>
                                <td class="text-center">
                                    <input type="text" class="form-control" ng-model="info.cardno" ng-blur="is_pass(info)" placeholder="身份证">
                                </td>
                                <td class="text-center">
                                    <input type="text" class="form-control" ng-model="info.mobile" ng-blur="is_pass(info)" placeholder="电话">
                                </td>
                                <td class="text-center">
                                    <input type="number" class="form-control" ng-model="info.num" ng-blur="is_pass(info)" placeholder="电话">
                                </td>
                                <td class="text-center">
                                    <textarea ng-model="info.note"></textarea>
                                </td>
                                <td class="text-center">
                                    <a class="btn btn-xs btn-warning mt5" ng-click="remove($index)">删除</a>
                                </td>
                                <td class="text-center">
                                    <!-- 校验通过 -->
                                    <div ng-if="info.state == 1" style="margin: auto; width: 30px; height: 30px; border-radius: 15px; background-color: green;">
                                    </div>
                                    <!-- 校验失败 -->
                                    <div ng-if="info.state == 2" style="margin: auto; width: 30px; height: 30px; border-radius: 15px; background-color: red;">
                                    </div>
                                    <!-- 校验中 下单中 -->
                                    <div ng-if="info.state == 3" style="margin: auto; width: 30px; height: 30px; border-radius: 15px; background-color: blue;">
                                    </div>
                                    <!-- 下单完成 -->
                                    <div ng-if="info.state == 4" style="margin: auto; width: 30px; height: 30px; border-radius: 15px; background-color: yellow;">
                                    </div>
                                </td>
                                <td class="text-center">
                                    {{info.desc}}
                                </td>
                            </tr>
                            <tr ng-show="!userList || userList.length == 0">
                                <td colspan="8" class="text-center">
                                    没有添加购票人
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal-footer">
    <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="isCreateOrdering">确定</button>
    <button class="btn btn-danger" type="button" ng-click="close()" ng-disabled="isCreateOrdering">关闭</button>
</div>


<table id="Excel_table" class="table table-bordered" style="margin-bottom: 0px;" ng-show="false">
    <thead>
        <tr>
            <th class="col-xs-1 text-center">name</th>
            <th class="text-center" style="width: 171px; padding: 0px; padding-bottom: 7px;">cardno</th>
            <th class="text-center" style="width: 120px;">mobile</th>
            <th class="text-center" style="width: 120px;">num</th>
            <th class="col-xs-2 text-center">note</th>
            <th class="text-center" style="width: 20%;">result</th>
        </tr>
    </thead>
    <tbody class="body_data">
        <tr ng-repeat="info in userList">
            <td class="text-center">
                {{info.name}}
            </td>
            <td class="text-center">
                `{{info.cardno}}
            </td>
            <td class="text-center">
                {{info.mobile}}
            </td>
            <td class="text-center">
                {{info.num}}
            </td>
            <td class="text-center">
                {{info.note}}
            </td>
            <td class="text-center">
                {{info.desc}}
            </td>
        </tr>
    </tbody>
</table>
<style>
    .body_data td{
        padding-left: 3px !important;
        padding-right: 3px !important;
        vertical-align: middle !important;
    }
</style>